package com.cg.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
/**
 * <p>
 * 
 * </p>
 *
 * @author lhy
 * @since 2024-12-26
 */
@Getter
@Setter
@Schema(description = "Personnel对象")
public class Personnel implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "人员唯一标识符，自增主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "登录账号，字符串类型，确保唯一性，用于用户登录验证，非空")
    private String loginAccount;

    @Schema(description = "人员姓名，字符串类型，表示系统用户的全名，非空")
    private String personName;

    @Schema(description = "手机号，字符串类型，允许NULL，用于联系用户")
    private String phoneNumber;

    @Schema(description = "状态，布尔值（0或1），1代表启用，0代表停用，默认为启用状态")
    private Boolean status;
    @Schema(description = "创建时间，自动设置为记录创建的时间戳")
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "YYYY-MM-dd")
    private LocalDateTime createdAt;
    @Schema(description = "更新时间，当记录被修改时自动更新为此时间戳")
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "YYYY-MM-dd")
    private LocalDateTime updatedAt;
    @Schema(description = "登录密码")
    @JsonIgnore
    private String password;
}
